/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Assignment.DTO;

import Assignment.Util.DateAdapter;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 *
 * @author dieptn
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="bookType", propOrder={
    "bookID",
    "title",
    "author",
    "publisher",
    "description",
    "price",
    "inventory",
    "imageLink",
    "dateModify",
    "category",
    "bestseller"
})
public class BookDTO {
    @XmlElement(required=true)
    private String bookID;
    @XmlElement(required=true)
    private String title;
    @XmlElement(required=true, nillable=true)
    private String author;
    @XmlElement(required=true, nillable=true)
    private String publisher;
    @XmlElement(required=true, nillable=true)
    private String description;
    @XmlElement(required=true, nillable=true)
    private float price;
    @XmlElement(required=true, nillable=true)
    private int inventory;
    @XmlElement(required=true, nillable=true)
    private String imageLink;
    @XmlElement(required=true, nillable=true)
    @XmlJavaTypeAdapter(DateAdapter.class)
    private Date dateModify;

    @XmlElement(required=true, nillable=true)
    private String category;
    @XmlElement(required=true, nillable=true)
    private boolean bestseller;

    public BookDTO() {
    }

    public BookDTO(String bookID, String title, String author, String publisher, String description, float price, int inventory, String imageLink, Date dateModify, String category, boolean bestSeller) {
        this.bookID = bookID;
        this.title = title;
        this.author = author;
        this.publisher = publisher;
        this.description = description;
        this.price = price;
        this.inventory = inventory;
        this.imageLink = imageLink;
        this.dateModify = dateModify;
        this.category = category;
        this.bestseller = bestSeller;
    }

    /**
     * @return the bookID
     */
    public String getBookID() {
        return bookID;
    }

    /**
     * @param bookID the bookID to set
     */
    public void setBookID(String bookID) {
        this.bookID = bookID;
    }

    /**
     * @return the title
     */
    public String getTitle() {
        return title;
    }

    /**
     * @param title the title to set
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * @return the author
     */
    public String getAuthor() {
        return author;
    }

    /**
     * @param author the author to set
     */
    public void setAuthor(String author) {
        this.author = author;
    }

    /**
     * @return the publisher
     */
    public String getPublisher() {
        return publisher;
    }

    /**
     * @param publisher the publisher to set
     */
    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return the price
     */
    public float getPrice() {
        return price;
    }

    /**
     * @param price the price to set
     */
    public void setPrice(float price) {
        this.price = price;
    }

    /**
     * @return the inventory
     */
    public int getInventory() {
        return inventory;
    }

    /**
     * @param inventory the inventory to set
     */
    public void setInventory(int inventory) {
        this.inventory = inventory;
    }

    /**
     * @return the imageLink
     */
    public String getImageLink() {
        return imageLink;
    }

    /**
     * @param imageLink the imageLink to set
     */
    public void setImageLink(String imageLink) {
        this.imageLink = imageLink;
    }

    /**
     * @return the dateModify
     */
    public Date getDateModify() {
        return dateModify;
    }

    /**
     * @param dateModify the dateModify to set
     */
    public void setDateModify(Date dateModify) {
        this.dateModify = dateModify;
    }

    /**
     * @return the category
     */
    public String getCategory() {
        return category;
    }

    /**
     * @param category the category to set
     */
    public void setCategory(String category) {
        this.category = category;
    }

    /**
     * @return the bestseller
     */
    public boolean isBestseller() {
        return bestseller;
    }

    /**
     * @param bestseller the bestseller to set
     */
    public void setBestseller(boolean bestseller) {
        this.bestseller = bestseller;
    }
}
